<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Just soso.</title>
  </head>
  <body>
    <h3>输入用户信息</h3>
    <!-- 传递给用户自身 -->
    <form action="">
      <div>学号：<input type="text" name="stuSno"></div>
      <div>姓名：<input type="text" name="stuname"></div>
      <div>密码：<input type="password" name="pwd"></div>
      <br>
      <input type="submit" name="sub" value="提交">
    </form>
  </body>
</html>

<?php
  function logInfo($key, $valueName) {
    echo "<br>";
    if (isset($_GET[$key])) {
      $xh=$_GET[$key];
      echo "$valueName 是: $xh";
    } else {
      echo "未填写";
    }
  }
  var_dump($_GET);
  logInfo("stuSno", "学号");
  logInfo("stuname", "姓名");
  logInfo("pwd", "密码");
?>